package com.ruoyi.worker.mapper;

import com.ruoyi.worker.domain.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @ProjectName: ruoyi
 * @Package: com.ruoyi.system.mapper
 * @ClassName: OperationNeedMapper
 * @Author: 胡志明
 * @Description:
 * @Date: 2021/9/9 21:32
 */
@Mapper
public interface OperationNeedMapper {

    /**
     * 获取质量预测管理列表数据
     * @param qualityPredictPojo
     * @return
     */
    List<QualityPredictPojo> getQualityPredictList(QualityPredictPojo qualityPredictPojo);

    /**
     * 根据用户ID获取用户所属部门，所属岗位
     * @param userId
     * @return
     */
    QualityPredictPojo viewUserData(@Param("userId") Integer userId);

    List<Map<String, Object>> viewTimeShift();

    List<Map<String, Object>> termTimeShif();

    /**
     * 查询用工需求列表
     * @param needTime
     * @return
     */
    List<OperationNeedPojo> getOperationNeedList(@Param("needTime") String needTime);

    /**
     * 查询班次信息
     * @return
     */
    List<String> getTimeShiftName();

    /**
     * 查询岗位信息
     * @return
     */
    List<Map<String,Object>> getSysPostName();

    /**
     * 校验用工单号
     * @param taskNumber
     * @return
     */
    Integer checkTaskNumber(@Param("taskNumber") String taskNumber);

    /**
     * 校验用工时间
     * @param needTime
     * @return
     */
    Integer checkNeedTime(@Param("needTime") String needTime);

    /**
     * 新增用工需求主表
     * @param operateNeedVaryPojo
     * @return
     */
    void addOperateNeed(OperateNeedVaryPojo operateNeedVaryPojo);

    /**
     * 新增用工需求详情表
     * @param addOperationNeedDetailList
     */
    void addOperationNeedDetailByList(@Param("addOperationNeedDetailList") List<OperationNeedDetailPojo> addOperationNeedDetailList);

    /**
     * 删除用工需求数据
     * @param operationNeedId
     */
    void deleteOperationNeed(@Param("operationNeedId") Integer operationNeedId);

    /**
     * 删除用工需求详情数据
     * @param operationNeedId
     */
    void deleteOperationNeedDetail(@Param("operationNeedId") Integer operationNeedId);

    void deleteStaffAssignmentsByOId(@Param("operationNeedId") Integer operationNeedId);

    /**
     * 修改用工需求数据
     * @param operateNeedVaryPojo
     */
    void updateOperationNeedById(OperateNeedVaryPojo operateNeedVaryPojo);

    /**
     * 审核用工需求
     * @param operateNeedVaryPojo
     */
    void auditOperationNeed(OperateNeedVaryPojo operateNeedVaryPojo);

    /**
     * 查询用工详情
     * @param operationNeedId
     * @return
     */
    List<FirmOperateNeedDetail> getFirmOperateNeedDetail(@Param("operationNeedId") Integer operationNeedId);

    /**
     * 获取用工需求数据
     * @param operationNeedId
     * @return
     */
    List<CreateStaffAssignmentsPojo> getStaffAssignmentsByOId(@Param("operationNeedId") Integer operationNeedId);

    /**
     * 新增渠道分配主表数据
     * @param staffAssignmentsPojo
     */
    void addStaffAssignments(StaffAssignmentsPojo staffAssignmentsPojo);

    /**
     * 获取班次类型
     * @return
     */
    List<Map<String,Object>> getTimeShiftType();

    /**
     * 获取渠道商信息
     * @return
     */
    List<Map<String,Object>> getCompanyData();

    /**
     * 新增渠道分配详情表数据
     * @param staffAssignmentsDetailPojoList
     */
    void addStaffAssignmentsDetailPojo(@Param("staffAssignmentsDetailPojoList") List<StaffAssignmentsDetailPojo> staffAssignmentsDetailPojoList);

    /**
     * 获取渠道人数配置数据
     * @param needTime
     * @return
     */
    List<StaffAssignmentsPojo> getStaffAssignmentsList(@Param("needTime") String needTime);

    /**
     * 修改审核状态
     * @param taskNode
     * @param checkRemark
     */
    void updateStaffAssignments(@Param("staffAssignmentsId") Integer staffAssignmentsId,@Param("taskNode") Integer taskNode,@Param("checkRemark") String checkRemark);

    /**
     * @Description : 渠道商人员分配信息获取
     * @Author : leizhang
     * @Date 11:04 上午 2021/9/12
     * @param staffAssignmentsPojo
     * @return java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
     **/
    List<StaffAssignmentsPojo> getAssignmentsInfo(StaffAssignmentsPojo staffAssignmentsPojo);

    /**
     * 删除用工分配主表
     * @param staffAssignmentsId
     */
    void deleteStaffAssignments(@Param("staffAssignmentsId") Integer staffAssignmentsId);

    /**
     * 删除用工详情表
     * @param staffAssignmentsId
     */
    void detStaffAssignmentsDetail(@Param("staffAssignmentsId") Integer staffAssignmentsId);

    /**
     * 查询人员分配详情
     * @param staffAssignmentsId
     * @return
     */
    List<StaffAssignmentsVaryPojo> getStaffAssignmentsDetail(@Param("staffAssignmentsId") Integer staffAssignmentsId);

    /**
     * 删除用工分配详情
     * @param staffAssignmentsId
     */
    void deleteStaffDetail(@Param("staffAssignmentsId") Integer staffAssignmentsId);

    /**
     * 修改用工分配主表
     * @param staffAssignmentsPojo
     */
    void updateStaffAssignmentsById(StaffAssignmentsPojo staffAssignmentsPojo);

    /**
     * 新增任务流水
     * @param taskChangePojo
     */
    void addTaskChangePojo(TaskChangePojo taskChangePojo);

    /**
     * 获取任务流水信息
     * @param staffAssignmentsId
     */
    List<TaskChangePojo> getTaskChangePojoByOId(@Param("staffAssignmentsId") Integer staffAssignmentsId);


    EmploymentPlanStatistics getEmploymentPlanStatisticsBySId(@Param("staffAssignmentsId") Integer staffAssignmentsId);

    String getOperationNeedId(@Param("staffAssignmentsId") Integer staffAssignmentsId);

    void addEmploymentPlanStatistics(EmploymentPlanStatistics employmentPlanStatistics);

    /**
     * 查询用工需求列表
     * @param workerNeedPojo
     * @return
     */
    List<WorkerNeedPojo> getWorkerNeedList(WorkerNeedPojo workerNeedPojo);

    /**
     * 作废用工需求
     * @param workerNeedId
     */
    void deleteWorkerNeed(@Param("workerNeedId") Integer workerNeedId);

    /**
     * 审核用工需求
     * @param workerNeedPojo
     */
    void auditWorkerNeed(WorkerNeedPojo workerNeedPojo);

    /**
     * 用工需求列表详情
     * @param workerNeedId
     * @return
     */
    WorkerNeedPojo viewWorkerNeed(@Param("workerNeedId") Integer workerNeedId);

    /**
     * 审核
     * @param qualityPredictPojo
     */
    void auditQualityPredict(QualityPredictPojo qualityPredictPojo);

    /**
     * 删除质量预测管理
     * @param qualityPredictId
     */
    void deleteQualityPredict(@Param("qualityPredictId") Integer qualityPredictId);

    /**
     * 编辑质量预测管理
     * @param qualityPredictPojo
     */
    void updateQualityPredict(QualityPredictPojo qualityPredictPojo);

    /**
     * 新增质量预测管理
     * @param qualityPredictPojo
     */
    void addQualityPredict(QualityPredictPojo qualityPredictPojo);

    void updateWorkerNeed(WorkerNeedPojo workerNeedPojo);

    void addQualityPredictUploadList(@Param("qualityPredictUploadPojoList") List<QualityPredictUploadPojo> qualityPredictUploadPojoList);

}
